package com.cyzy.homework.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 作业DTO
 */
@Data
public class HomeworkDTO {
    
    private Long id;
    
    @NotBlank(message = "班级ID不能为空")
    private String classId;
    
    @NotBlank(message = "教师ID不能为空")
    private String teacherId;
    
    @NotBlank(message = "作业标题不能为空")
    private String title;
    
    private String content;
    
    @NotNull(message = "截止时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline;
    
    private Boolean isUrgent = false;
    
    private Integer status = 0;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    
    // 统计信息
    private Integer totalCount = 0;  // 总人数
    private Integer submittedCount = 0;  // 已提交人数
    private Integer gradedCount = 0;  // 已批改人数
    
    // 教师信息
    private String teacherName;
    
    // 班级信息
    private String className;
}
